package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.vo.AdminDashboardVO;
import com.cskaoyan.service.AdminDashboardService;
import com.fasterxml.jackson.databind.ser.Serializers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author heyyon
 * 首页
 * todo 货品数量有可能查询的表不对，暂时放着
 */
@RestController
public class AdminDashboardController {
    @Autowired
    AdminDashboardService adminDashboardService;
    @RequestMapping("admin/dashboard")
    public BaseRespVo adminDashboard() {
        AdminDashboardVO adminDashboardVO = adminDashboardService.adminDashboardInfo();
        return BaseRespVo.ok(adminDashboardVO);
    }
}
